<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>isPrototypeOf检测继承关系</title>
</head>
<body>
    <script>
        // let a = {};
        // let b = {
        //     __proto__:a
        // };
        // let c = {
        //     __proto__:b
        // };

        // // 判断a对象是否在b的原型链上
        // console.log(a.isPrototypeOf(b));
        // console.log(b.isPrototypeOf(c));
        // console.log(a.isPrototypeOf(c));


        class User{}
        class Admin extends User{}
        let admin = new Admin();
        console.log(Admin.prototype.isPrototypeOf(admin));
    </script>
</body>
</html>